package com.TT.service;

import com.TT.dao.mysql.OprLogMapper;
import com.TT.domain.mysql.OprLog;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 苏文广 created at 2018/11/26
 * @Description:
 */
@Slf4j
@Service
public class LogService {
    @Resource
    OprLogMapper oprLogMapper;

    public boolean log(OprLog oprLog){
        try {
            oprLogMapper.insertSelective(oprLog);
            return true;
        }catch (Exception e){
            e.printStackTrace();
            log.error(e.getMessage());
            throw e;
        }
    }
}
